package top.huhuiyu.demo.javaweb.util;

import top.huhuiyu.demo.javaweb.entity.User;

import javax.servlet.http.HttpServletRequest;

/**
 * @author 胡辉煜
 */
public class UserUtil {
  public static User getUser(HttpServletRequest request) {
    User user = new User();
    user.setUsername(request.getParameter("username"));
    user.setPassword(request.getParameter("password"));
    user.setNickname(request.getParameter("nickname"));
    return user;
  }

}
